#------------------------------------------------
# namespace meta
#------------------------------------------------

namespace eval meta {
}

proc meta::assert { args } {
    set expression $args
    set rv [uplevel expr $expression]
    #-- XXX: use "[" to workaround new_default debug
    if $rv {
        puts "--- PASS ---: {[uplevel subst $expression]}"
        return true
    } else {
        puts "--- FAIL ---: {[uplevel subst $expression]}"
        return false
    }
}

proc meta::exec {args} {
    set status 0
    if {[catch {uplevel eval ::exec $args} results]} {
       if {[lindex $::errorCode 0] == "CHILDSTATUS"} {
          set status [lindex $::errorCode 2]
       } else {
          # Some kind of unexpected failure
          set status 255
       }
    }
    return $status
}

